/**
 *====================================================
 * 文件名称: FinanceAuditLogEntity.java
 * 修订记录：
 * No    日期				作者(操作:具体内容)
 * 1.    2015年9月23日			chenxy(创建:创建文件)
 *====================================================
 * 类描述：(说明未实现或其它不应生成javadoc的内容)
 */
package com.yuexunit.finance.project.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;


/** 
 * 流程审核轨迹日志
 * @ClassName: FinanceAuditLogEntity 
 * @author: NTBK-021-1010
 * @date: 2016年11月4日 下午1:41:40  
 */
@Entity
@Table(name = "FIN_AUDIT_LOG")
public class FinanceAuditLogEntity implements Comparable<FinanceAuditLogEntity> {

	/** 融资日志ID */
	@Id
	@GeneratedValue
	@Column(name = "ID")
	private Long id;
	
	/** 提货申请ID */
	@Column(name = "PICKUP_ID")
	private Long pickupId;
	
	/** 创建审核时间 */
	@Column(name = "AUDIT_DT")
	private Date auditDate;
	
	/** 审核角色信息 */
	@Column(name = "ROLE_NAME")
	private String roleName;

	/**   审核状态类型:0:拒绝/1:同意*/
	@Column(name = "AUDIT_STATE")
	private Long auditState;
	
	/** 审核意见 */
	@Column(name = "OPINION")
	private String opinion;
	
	/** 审核关联业务ID  如:融资ID、放款ID、提货ID */
	@Column(name = "AUDIT_JOIN_ID")
	private Long auditJoinId;
	
	/** 审核业务类型  1:融资、2:放款、3:提货  、4：用户审核 、5:用户等级审核、 6：临时额度审核 7：代采代销提货*/
	@Column(name = "AUDIT_TASK")
	private Long auditTask;
	
	/** 当前流程节点审核状态 */
	@Column(name = "FINAL_STATE")
	private Long finalState;
	
	/** 创建时间 */
	@Column(name = "CREATE_DT")
	private Date createDateTime;
	
	/** 当前审批用户信息 */
	@Column(name = "ACCOUNT_ID")
	private Long accountId;
	
	
	public Long getPickupId() {
		return pickupId;
	}

	public void setPickupId(Long pickupId) {
		this.pickupId = pickupId;
	}

	public Long getAccountId() {
		return accountId;
	}

	public void setAccountId(Long accountId) {
		this.accountId = accountId;
	}

	public FinanceAuditLogEntity() {
		super();
	}

	public FinanceAuditLogEntity(Date auditDate, String roleName,
			Long auditState, String opinion, Long auditJoinId, Long auditTask,Long accountId) {
		super();
		this.auditDate = auditDate;
		this.roleName = roleName;
		this.auditState = auditState;
		this.opinion = opinion;
		this.auditJoinId = auditJoinId;
		this.auditTask = auditTask;
		this.accountId=accountId;
	}
	
	

	public FinanceAuditLogEntity(Long id, Date auditDate, String roleName,
			Long auditState, String opinion, Long auditJoinId, Long auditTask,
			Long finalState, Date createDateTime) {
		super();
		this.id = id;
		this.auditDate = auditDate;
		this.roleName = roleName;
		this.auditState = auditState;
		this.opinion = opinion;
		this.auditJoinId = auditJoinId;
		this.auditTask = auditTask;
		this.finalState = finalState;
		this.createDateTime = createDateTime;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Date getAuditDate() {
		return auditDate;
	}

	public void setAuditDate(Date auditDate) {
		this.auditDate = auditDate;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public Long getAuditState() {
		return auditState;
	}

	public void setAuditState(Long auditState) {
		this.auditState = auditState;
	}

	public String getOpinion() {
		return opinion;
	}

	public void setOpinion(String opinion) {
		this.opinion = opinion;
	}

	public Long getAuditJoinId() {
		return auditJoinId;
	}

	public void setAuditJoinId(Long auditJoinId) {
		this.auditJoinId = auditJoinId;
	}

	public Long getAuditTask() {
		return auditTask;
	}

	public void setAuditTask(Long auditTask) {
		this.auditTask = auditTask;
	}

	public Long getFinalState() {
		return finalState;
	}

	public void setFinalState(Long finalState) {
		this.finalState = finalState;
	}

	public Date getCreateDateTime() {
		return createDateTime;
	}

	public void setCreateDateTime(Date createDateTime) {
		this.createDateTime = createDateTime;
	}

	@Override
	public int compareTo(FinanceAuditLogEntity o) {
		if (this.createDateTime.getTime() < o.createDateTime.getTime()) {
			return 1;
		} else {
			return -1;
		}
	}
}
